<template>
  <div class="city-select">
    <select :value="modelValue" @change="$emit('update:modelValue', $event.target.value)">
      <option v-for="city in cities" :key="city" :value="city">
        {{ city }}
      </option>
    </select>
  </div>
</template>

<script>
export default {
  name: 'CitySelect',
  props: {
    modelValue: String,
    cities: {
      type: Array,
      default: () => ['成都']
    }
  },
  emits: ['update:modelValue']
}
</script>

<style scoped>
.city-select {
  text-align: center;
  margin: 0;
}

select {
  padding: 10px 32px;
  font-size: 16px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  background-color: #fff;
  transition: all 0.3s;
  min-width: 200px;
}

select:hover {
  border-color: #409eff;
}

select:focus {
  border-color: #409eff;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}
</style> 